<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<!-- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -->
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="format-detection" content="telephone=no">
<meta name="apple-mobile-web-app-capable" content="yes">
<title>我的</title>
<%@ include file="/page/wx/include.jsp" %>
<script type="text/javascript" src="<%=basePath%>/statics/plugins/layer/layer.js"></script>
<link rel="stylesheet"  type="text/css"  href="<%=basePath%>/statics_wx/css/style.css" />
<link rel="stylesheet" type="text/css"  href="<%=basePath%>/statics_wx/css/main2.css" />
<style type="text/css">
.member_info12 .bd ul li s {
	text-decoration: none;
    background: #ec5754;
    color: #fff;
    position: absolute;
    margin-left: 50px;
    margin-top: -30px;
    display: block;height:0.3rem;line-height:0.3rem;
    margin-right: -.35rem;
    font-size: .16rem;
    border-radius: .15rem;
    padding: 0 .1rem;
}
</style>
</head>
<body style="background:#f3f3f3">
	<div class="overlay" id="qd_box" style="display: none;">
		<div class="qd_box">
			<div class="bd">
				<img src="${rootPath}/statics_wx/images/image-qdok.png" />
				<p>获得${signPoint }积分</p>
			</div>
			<div class="bottom">
				<p>
					<input type="button" class="inputbtn1"
						onclick="javascript: window.location.href='<%=basePath%>/wx/my';"
						value="确 定" />
				</p>
			</div>
		</div>
	</div>
	<div class="member_header">
		<div class="member_header_con">
			<div class="member_info11">
				<div class="pic">
					<img class="userAccount" src="${headImageUrl }" />
				</div>
				<div class="item-info">
					<c:if test="${customerInfo != null }">
						<h2 class="userAccount">${customerInfo.userName}</h2>
					</c:if>
					<c:if test="${empty customerInfo }">
						<h3>
							没有账号？<a
								style="text-decoration: underline; color: #fff; font-weight: 400; font-size: 0.28rem;"
								href="${rootPath }/wx/my/toRegisterPage">点击注册</a>
						</h3>
						<h3>
							已有账号？<a
								style="text-decoration: underline; color: #fff; font-weight: 400; font-size: 0.28rem;"
								href="${rootPath }/wx/my/toBindAccountPage">点击绑定</a>
						</h3>
					</c:if>
					<c:if test="${customerInfo != null}">
						<h3>
							<label id="pointLabel">${point }</label> 积分 <c:if test="${signPoint != 0  && signInControl == 1}"> / 签到可得<label id="signPointLabel">${signPoint }</label>积分</c:if>
						</h3>
						<c:if test="${signPoint != 0 && signInControl == 1}">
							<c:choose>
								<c:when test="${isSigned == 1 }">
									<p>
										<a href="#" onclick="javascript: $('#qd_box').hide();layer.msg('您今天已经签到啦~',{time:3000});"><span>已签到</span></a>
									</p>
								</c:when>
								<c:otherwise>
									<p>
										<a href="javascript:doSign();"><span>签到</span></a>
									</p>
								</c:otherwise>
							</c:choose>
						</c:if>
					</c:if>
				</div>
			</div>
		</div>
	</div>
	<div class="member_info12">
		<div class="hd">
			<a href="${rootPath}/wx/order/list">
				<h3>
					<i></i><span>我的订单</span>
				</h3> <b><span>查看全部订单</span><i></i></b>
			</a>
		</div>
		<div class="bd">
			<ul>
				<li><a href="${rootPath}/wx/order/list?orderStatus=01">
				<p>
					<i class="icon1"></i><c:if test="${TO_PAY != 0 }"><s>${TO_PAY }</s></c:if> <span>待支付</span>
				</p>
				</a></li>
				<li><a href="${rootPath}/wx/order/list?orderStatus=04">
				<p>
					<i class="icon2"></i></i><c:if test="${TO_SEND != 0 }"><s>${TO_SEND }</s></c:if> <span>待发货</span>
				</p>
				</a></li>
				<li><a href="${rootPath}/wx/order/list?orderStatus=05">
				<p>
					<i class="icon3"></i></i><c:if test="${TO_SIGN != 0 }"><s>${TO_SIGN }</s></c:if> <span>待收货</span>
				</p>
				</a></li>
				<li><a href="${rootPath}/wx/order/list?payStatus=01&payModel=02">
				<p>
					<i class="icon4"></i></i><c:if test="${TO_CREDIT != 0 }"><s>${TO_CREDIT }</s></c:if> <span>欠款</span>
				</p>
				</a></li>
			</ul>
		</div>
	</div>
	<div class="member_info12">
		<div class="hd">
			<a href="${rootPath}/wx/order/list">
				<h3>
					<i></i><span>我的资产</span>
				</h3>
			</a>
		</div>
		
		<div class="bd">
			<ul>
				<li><a href="<%=basePath%>/wx/my/wxWallet/toMyWallet">
						<p>
							<i class="icon6"></i> <span>钱包</span>
						</p>
				</a></li>
				<li><a href="<%=basePath%>/wx/point/myPoint">
						<p>
							<i class="icon7"></i> <span>积分</span>
						</p>
				</a></li>
				<li><a href="<%=basePath%>/wx/my/toCouponPage">
						<p>
							<i class="icon8"></i> <span>优惠券</span>
						</p>
				</a></li>
				<li><a href="<%=basePath%>/wx/my/wxCustomerAccount/toMyAccount">
						<p>
							<i class="icon9"></i> <span>银行卡</span>
						</p>
				</a></li>
			</ul>
		</div>
	</div>
	<div class="member_info12">
		<div class="hd">
			<a href="${rootPath}/wx/order/list">
				<h3>
					<i></i><span>常用服务</span>
				</h3>
			</a>
		</div>
		<div class="bd">
			<ul>
				<li><a href="<%=basePath%>/wx/favorite/toFavoritePage">
						<p>
							<i class="icon10"></i> <span>收藏夹</span>
						</p>
				</a></li>
				<li><a
					href="<%=basePath%>/wx/browseRecord/toProductBrowseRecordPage">
						<p>
							<i class="icon11"></i> <span>足迹</span>
						</p>
				</a></li>
				<li><a href="${rootPath}/wx/my/companyInfo">
						<p>
							<i class="icon12"></i> <span>公司信息</span>
						</p>
				</a></li>
				<li><a href="${rootPath}/wx/address/toWxAddressListPage">
						<p>
							<i class="icon13"></i> <span>收货地址</span>
						</p>
				</a></li>
				<li><a href="${rootPath}/wx/customer/myCustomer">
						<p>
							<i class="icon14"></i> <span>我的客户</span>
						</p>
				</a></li>
				<li><a href="<%=basePath%>/wx/my/myShare">
						<p>
							<i class="icon15"></i> <span>我的分享</span>
						</p>
				</a></li>
				<li><a href="<%=basePath%>/wx/my/myInvitation">
						<p>
							<i class="icon16"></i> <span>我的推广码</span>
						</p>
				</a></li>
				<li><a href="<%=basePath%>/siteConfigItem/contact?type=wx">
						<p>
							<i class="icon14"></i> <span>联系我们</span>
						</p>
					</a>
				</li>
			</ul>
		</div>
	</div>
	<div class="footerfixed"></div>
	<jsp:include page="../wx_footer.jsp" />
</body>
<script type="text/javascript">
$(function() {
	var point = $("#pointLabel").html();
	$("#pointLabel").html(parseFloat(point));
	var signPoint = $("#signPointLabel").html();
	$("#signPointLabel").html(parseFloat(signPoint));
});

function doSign() {
    $.ajax({
        type : "post",
        url : rootPath + '/home/doSign',
        async : false,
        datatype : "json",
        success : function(json) {
            if (json.code == '1') {
                $("#qd_box").show();
                //layer.msg(json.msg,function() {},{time:2000});
            } else {
                layer.msg(json.msg,{time:3000});
            }
        },
        error : function() {
            layer.msg('暂时无法签到',{time:1000});
        }
    });
}
</script>
<script src="${rootPath }/js/wx/my/my.js"></script>
</html>